//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-

extends ../body

block content
  h2
    | #{approvalRequest.org}/#{approvalRequest.repoName}
    | &nbsp;
    small= approvalRequest.repoVisibility

  p.
    Your request has been submitted.

  if approvalRequest.repoVisibility === 'public'
    p This request is for a public repo, so if your request is approved, the repo will be visibility immediately. If you did not intend for this to go public, please cancel this request.

  else if approvalRequest.repoVisibility === 'private'
    p This request is for a private repo. Please note that there may be a limit to the number of private repos for the organization.
    p Per Microsoft policy, GitHub is not a permitted source control system for MBI source code and is only intended for open source projects, or those currently in the release approval process pending going public as open source. This request may be denied if there is reason to believe that it is a private engineering effort. Please consider VSTS/1ES for any internal projects.

  p
    a(href=reposSiteUrl + 'approvals/', style='display:inline-block;background-color:#eee;font-size:18px;padding:12px') Review your requests here

  table.technical(style='width:80%')
    thead
      tr
        th(colspan=2) Requested by
    tbody
      tr
        td
          p
            a(href='https://github.com/' + approvalRequest.ghu)= approvalRequest.ghu
        td= approvalRequest.email
    thead
      tr
        th(colspan=2) Repo information
    tbody
      tr
        td GitHub organization
        td= approvalRequest.org
      tr
        td Repository name
        td= approvalRequest.repoName
      if approvalRequest.repoDescription
        tr
          td Repo description
          td= approvalRequest.repoDescription
      tr
        td Initial visibility
        td= approvalRequest.repoVisibility === 'public' ? 'Public' : 'Private'
    if approvalRequest.justification
      thead
        tr
          th(colspan=2) Justification
        tr
          td(colspan=2)= approvalRequest.justification
    thead
      tr
        th(colspan=2) Permissions
      if approvalRequest.teamsCount
        tr
          td Authorized teams
          td= approvalRequest.teamsCount

  p If you prefer not to click on email links, you can find your requests by:
  ul
    li Navigating to the open source repos site at #{reposSiteUrl}
    li Go to the <em>/approvals</em> URL
    li Review your request details
